<?php
/**
 * This file is part of Hyperf Mall.
 *
 * @link     https://gitee.com/scwlkj/hypref_mall
 * contact  hyperf_mall@163.com
 */
namespace App\JsonRpc;

use App\Repository\SignRepository;
use Hyperf\RpcServer\Annotation\RpcService;
use App\JsonRpc\Interfaces\SignServiceInterface;

/**
 * @RpcService(name="Member::SignService", protocol="jsonrpc", server="jsonrpc")
 */
class SignService extends BaseService implements SignServiceInterface
{
    public function init()
    {
        $this->repository = SignRepository::getInstance();
    }

    /**
     * Notes: 获取签到记录
     * Author: Bruce.z
     * DateTime: 2022/7/18 17:38
     * @param int $member_id
     * @param string $date
     * @return array
     */
    public function initData(int $member_id, string $date):array
    {
        return $this->repository->initData($member_id, $date);
    }
}
